import request from '@/utils/request'

/**
 * 登录 /park/login
 */
export const login = (username, password) => {
  return request({
    url: '/park/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}
/**
 * 修改密码 /park/profile/updatePwd
 */
export const changePassword = (oldPassword, newPassword) => {
  return request({
    url: '/park/profile/updatePwd',
    method: 'post',
    data: {
      oldPassword,
      newPassword
    }
  })
}
/**
 * @description: 获取用户信息
 * @param {*} data {}
 * @return {*} promise
 */
export function getProfileAPI() {
  return request({
    url: '/park/user/profile',
    method: 'GET'
  })
}
